When flush tlb mask, we need consider the cpu_online_map.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 30 Mar 2010 07:31:16 +0000 (08:31 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 30 Mar 2010 07:31:16 +0000 (08:31 +0100)
commitf17a2b83f791f152d7590e9eb04d2fd20220217c
tree5db367c48c3bdabbe2d27670e97a64ede1ec3100
parentb1ded68a3c56de12dc2c18978bdf999f25909af3
When flush tlb mask, we need consider the cpu_online_map.

The same is true for EPT flushes.

We noticed sometime system hang on cpu online/offline stress test. The
reason is because flush_tlb_mask from __get_page_type is deadloop.

This should be caused by a small windows in cpu offline.  The
cpu_online_map is changed and the interrupt is disabled at
take_cpu_down() for the to-be-offline CPU.

However, the __sync_lazy_execstate() called from idle_task_exit() in
the idle_loop() for the to-be-offline CPU. At that time, the
stop_machine_run is finished already, and __get_page_type may be
called in other CPU before the __sync_lazy_execstate().

Thanks Jan pointing out issue in my original patch.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/smp.c